package com.itheima;

public class Demo02 {
    public static void main(String[] args) {

        //把字符数组变成字符串
        char[] chr = {'a', 'b', 'c', 'd'};
        String s = new String(chr);
        System.out.println(s);

        //用字符串创建对象
        String s1 = new String("abcd");
        System.out.println(s1);

        //简化创建
        String s2 = "abcd";
        System.out.println(s2);
    }
}
